﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="UrlFilterRules"
    targetNamespace="Sherwood.SignOn.Client.UrlFilter"
    elementFormDefault="qualified"
    xmlns="Sherwood.SignOn.Client.UrlFilter"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
    <xs:element name="Rules">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Rule" type="Rule" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="defaultDenyRedirectUrl" default="" type="xs:string" />
            <xs:attribute name="defaultAllowRedirectUrl" default="" type="xs:string" />
        </xs:complexType>
    </xs:element>

    <xs:complexType name="Rule">
        <xs:sequence>
            <xs:element name="url" maxOccurs="1" minOccurs="1" type="xs:string"/>
            <xs:element name="hosts" minOccurs="0" maxOccurs="1" type="xs:string" default=""></xs:element>
            <xs:element name="users" maxOccurs="1" minOccurs="0" type="xs:string" default=""/>
            <xs:element name="roles" maxOccurs="1" minOccurs="0" type="xs:string" default=""/>
            <xs:element name="referrer" maxOccurs="1" minOccurs="0" type="xs:string" default=""/>
            <xs:element name="denyRedirectUrl" maxOccurs="1" minOccurs="0" type="xs:string" default=""/>
            <xs:element name="allowRedirectUrl" maxOccurs="1" minOccurs="0" type="xs:string" default=""/>
            <xs:element name="requireSession" maxOccurs="1" minOccurs="0" type="xs:boolean" />
            <xs:element name="requireNonPersistentSession" maxOccurs="1" minOccurs="0" type="xs:boolean" />
        </xs:sequence>
        <xs:attribute name="alwaysDeny" default="false" type="xs:boolean" />
        <xs:attribute name="alwaysAllow" default="false" type="xs:boolean" />
    </xs:complexType>

</xs:schema>
